
<template>
  <div>
    <Form :label-width="120">
      <!--<FormItem label="显示映射组件">
        <Tooltip content="如果设置为false，则不显示映射组件，但是数据映射的功能还存在" :max-width="200" placement="top">
          <i-switch v-model="obj.show">
            <span slot="open"></span>
            <span slot="close"></span>
          </i-switch>
        </Tooltip>
      </FormItem>-->
      <FormItem label="最小值">
        <InputNumber size="small" :max="10000000" :min="-10000000" v-model="obj.min"></InputNumber>
      </FormItem>
      <FormItem label="最大值">
        <InputNumber size="small" :max="10000000" :min="-10000000" v-model="obj.max"></InputNumber>
      </FormItem>
      <FormItemPanel title="填充颜色">
        <Alert style="padding: 8px; text-align: justify;">
          色值从上至下对应最小值与最大值
        </Alert>
        <FormItem :label="'色值'+(index+1)" v-for="(c, index) in obj.inRange.color" :key="index">
          <PnColorPicker size="small" v-model="obj.inRange.color[index]" alpha recommend/>
        </FormItem>
        <!--<FormItem label="最小值时">
          <PnColorPicker size="small" v-model="obj.inRange.color[0]" alpha recommend/>
        </FormItem>
        <FormItem label="最大值时">
          <PnColorPicker size="small" v-model="obj.inRange.color[1]" alpha recommend/>
        </FormItem>-->
      </FormItemPanel>
      <!--<FormItem label="显示拖拽手柄">
        <Tooltip content="手柄能拖拽调整选中范围" :max-width="200" placement="top">
          <i-switch v-model="obj.calculable">
            <span slot="open"></span>
            <span slot="close"></span>
          </i-switch>
        </Tooltip>
      </FormItem>
      <FormItem label="手柄拖拽实时更新">
        <Tooltip content="如果为ture则拖拽手柄过程中实时更新图表视图" :max-width="200" placement="top">
          <i-switch v-model="obj.realtime">
            <span slot="open"></span>
            <span slot="close"></span>
          </i-switch>
        </Tooltip>
      </FormItem>-->
      <!--<FormItem label="小数精度">
        <Tooltip content="数据展示的小数精度，默认为0，无小数点" :max-width="200" placement="top">
          <InputNumber size="small" :max="10" :min="0" v-model="obj.precision"></InputNumber>
        </Tooltip>
      </FormItem>-->
    </Form>
  </div>
</template>

<script>
  export default {
    name: "CPMVisualMapContinuousSettingForm",
    props: {
      value: {
        type: Object
      }
    },
    data() {
      return {
        obj: this.value
      }
    },
    mounted() {

    },
    methods: {

    },
    computed: {

    },
    watch: {
      value (val) {
        this.obj = val;
      },
      obj (val) {
        this.$emit('input', val);
      }
    }
  }
</script>

<style scoped>

</style>
